hex.cpp